up: programming - HTML  
HTML
text area
What links here?
Text areas are used for multiple-line text entry. The default size of the text box is 1 row by 20 characters. You can change the size using the COLS and ROWS attributes. Here's a typical example of a text area with a text box 40 characters wide by 7 rows:

<TEXTAREA NAME="myarea" COLS="40" ROWS="7">
</TEXTAREA>


The text area can be initialized by placing the initial text between the tags:

<TEXTAREA NAME="myarea" COLS="40" ROWS="7">
Initial text
</TEXTAREA>


You can use JavaScript to read the contents of the text area box. This is done with the value property. Here is an example:

<SCRIPT LANGUAGE="JavaScript">
function seeTextArea (form) {
    alert (form.myarea.value);
}
</SCRIPT>


document.getElementById("myTextarea").value


Text area resizing control via CSS:
textarea { resize:both; }
 /* none|horizontal|vertical|both */
textarea.vert { resize:vertical; }
textarea.noResize { resize:none; }

Textarea Properties (only properties available in all browsers are listed)
namedescription
accessKeySets or retrieves an access key to an element.
attributesRepresents a collection of attribute nodes that belong to an element.
childElementCountreturns number of child elements
childNodesreturns a collection of all nodes that are immediate descendants of this element
childrenreturns a collection of elements that are immediate descendants of this element
classNameread or write the style class(es) that belong to this element
clientHeightreturns the visible height of this element in pixels
includes padding
does not include scrollBar, border, margin.
clientWidthreturns the visible width of this element in pixels
includes padding
does not include scrollBar, border, margin
colsread or write width in columns
contentEditableread or write whether this element may be edited
defaultValueread or write the element's default value. The default value can be set with the HTML value attribute
dirread or write the element's direction property
disabledread or write the element's ability to accept user interaction
firstChildreturns a reference to the element's first child
firstElementChildreturns a reference to the element's first element child
idread or write the element's unique identifier
innerHtmlread or write the source code of element
innerTextread or write the text content of element
isContentEditablereturns indication of whether contents of element can be edited by user.
langread or write the language of the element
lastChildreturns a reference to the element's last child
nameread or write the element's name (used for sending form data to server)
nextSiblingreturns a reference to the current element's parent's next child
nodeNamereturns the name of the element
nodeTypereturns an integer representing the element's type
nodeValueread or write the element's value
offsetHeightreturns the visible height of this element in pixels
includes padding, scrollBar, border
does not include margin.
offsetLeftreturns offset in pixels from element's offsetParent
offsetParentreturns a reference to the element that this element's position is calculated from
outerHTMLread or write the HTML content, including start and end tags
outerTextread or write the element's text content, including the content of it's descendents
namedescription



Resources
Dottoro: textarea object
programming - HTML - text area
filename:programming - HTML - text area
filename:programming%20%2D%20HTML%20%2D%20text%20area
last edit:August 29 2014 19:55:27 (3537 days ago)
ct = 1714989089.000000 = May 06 2024 05:51:29
ft = 1409356527.000000 = August 29 2014 19:55:27
dt = 305632562.000000